/**
 * @author yanggjun
 */
Physical = {
		Rspeed : 10,
		RaiseUpDown : function(type){
			//raise up/down building
			if(type == 0){
				var buildingList = World.map.building;
				for(var i=0; i<buildingList.length; i++){
					var building = buildingList[i];
					if(building.startRaise){
						var curPosY = building.curPos.y + building.Rdirection*building.Rspeed;
						//building.position.set(building.pos.x,curPosY,building.pos.z);
						if(World.modelList[i].buildingIndex == i){
							World.modelList[i].ob.position.set(building.pos.x, curPosY, building.pos.z);
							World.triggerList[i].position.set(building.pos.x, curPosY + 0.6*building.height, building.pos.z);
							TriggerModel[i].pos.y = curPosY + 0.6*building.height;
						}
						building.curPos.y = curPosY;
						if(building.Rdirection == -1 && curPosY < -building.height/2 + 100){
							building.startRaise = false;
							building.Rdirection = 1;
						}else if(building.Rdirection == 1 && curPosY > building.height/2){
							building.startRaise = false;
							building.Rdirection = -1;
						}
					}
				}
			}
		},
}